﻿using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.Remoting;
using System.Text;
using log4net;
using log4net.Plugin;
namespace LogViewer
{

    public class Program
    {
        private static readonly ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

        private static void Main(string[] args)
        {
            if (log.IsInfoEnabled)
            {
                log.Info("[日志查看器]启动");
            }
            RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);
            LogManager.GetRepository().PluginMap.Add(new RemoteLoggingServerPlugin("LoggingSink"));
            Console.WriteLine("输入 0 和 ENTER 键退出");
            for (string str = ""; string.Compare(str, "0", true) != 0; str = Console.ReadLine())
            {
            }
            if (log.IsInfoEnabled)
            {
                log.Info("[日志查看器]退出");
            }
        }
    }
}
